<?php

/*	$uid = $_POST['uid'];
	$pnow = $_POST['pnow'];
	if(!$uid){
		exit('err');
	}
	$where = array(); 
	array_push($where,array('uid',$_POST['uid'],'='));
	$ignore = '';
	$max_page = 10;
	$desc = 'desc';
	$cache_path = '';
	$pdo = MyPdo::init();
	$query_field = 'id,ip,time';
	$sess_name = 'After_Get_User_Login_Record';
	//echo $pnow;exit;
	Get_Data_For_Fpage_Infinite_b($pdo,$pnow,$sess_name,'bmxx8_login_record','id',$where,$desc,10,$ignore,$max_page,$cache_path,$query_field);
*/
exit;
//--------------------------------------------------


	$uid = $_POST['uid'];
	$pnow = $_POST['pnow'];
	if(!$uid){
		exit('err');
	}
	$psize = 10;
	$limit_start = ($pnow-1) * $psize;
	$pdo = MyPdo::init();
	$sql = "select count(*) as count from bmxx8_login_record where uid = ?";
	$res = $pdo->dql($sql,array($uid),1);
	$count = $res['count'];

	$sql = "select ip,time from bmxx8_login_record where uid = ? order by id desc limit {$limit_start},{$psize}";
	$res = $pdo->dql($sql,array($uid));
	if($res){
	//	echo json_encode($res);
		$pcount = ceil($count/$psize);
		Merge_Or_Make_Cache($res,'',$pcount,$pnow);
	}else{
		exit('err');
	}